package com.chen.mall.modules.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;


/**
 * <p>
 * 后台用户登录日志表
 * </p>
 *
 * @author macro
 * @since 2020-08-21
 */
@TableName("ums_admin_login_log")
@ApiModel(value="UmsAdminLoginLog对象", description="后台用户登录日志表")
public class UmsAdminLoginLog implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long adminId;

    private Date createTime;

    private String ip;

    private String address;

    @ApiModelProperty(value = "浏览器登录类型")
    private String userAgent;

    public UmsAdminLoginLog() {
    }


    public Long getId() {
        return this.id;
    }

    public Long getAdminId() {
        return this.adminId;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public String getIp() {
        return this.ip;
    }

    public String getAddress() {
        return this.address;
    }

    public String getUserAgent() {
        return this.userAgent;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String toString() {
        return "UmsAdminLoginLog(id=" + this.getId() + ", adminId=" + this.getAdminId() + ", createTime=" + this.getCreateTime() + ", ip=" + this.getIp() + ", address=" + this.getAddress() + ", userAgent=" + this.getUserAgent() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof UmsAdminLoginLog)) return false;
        final UmsAdminLoginLog other = (UmsAdminLoginLog) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$adminId = this.getAdminId();
        final Object other$adminId = other.getAdminId();
        if (this$adminId == null ? other$adminId != null : !this$adminId.equals(other$adminId)) return false;
        final Object this$createTime = this.getCreateTime();
        final Object other$createTime = other.getCreateTime();
        if (this$createTime == null ? other$createTime != null : !this$createTime.equals(other$createTime))
            return false;
        final Object this$ip = this.getIp();
        final Object other$ip = other.getIp();
        if (this$ip == null ? other$ip != null : !this$ip.equals(other$ip)) return false;
        final Object this$address = this.getAddress();
        final Object other$address = other.getAddress();
        if (this$address == null ? other$address != null : !this$address.equals(other$address)) return false;
        final Object this$userAgent = this.getUserAgent();
        final Object other$userAgent = other.getUserAgent();
        if (this$userAgent == null ? other$userAgent != null : !this$userAgent.equals(other$userAgent)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UmsAdminLoginLog;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $adminId = this.getAdminId();
        result = result * PRIME + ($adminId == null ? 43 : $adminId.hashCode());
        final Object $createTime = this.getCreateTime();
        result = result * PRIME + ($createTime == null ? 43 : $createTime.hashCode());
        final Object $ip = this.getIp();
        result = result * PRIME + ($ip == null ? 43 : $ip.hashCode());
        final Object $address = this.getAddress();
        result = result * PRIME + ($address == null ? 43 : $address.hashCode());
        final Object $userAgent = this.getUserAgent();
        result = result * PRIME + ($userAgent == null ? 43 : $userAgent.hashCode());
        return result;
    }
}
